using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._OrthoMapping
{
    /// <summary>
    /// <para>Build Stereo Model</para>
    /// <para>Builds a stereo model of a mosaic dataset based on a user-provided stereo pair.</para>
    /// <para>基于用户提供的立体对构建镶嵌数据集的立体模型。</para>
    /// </summary>    
    [DisplayName("Build Stereo Model")]
    public class BuildStereoModel : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public BuildStereoModel()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Input Mosaic Dataset</para>
        /// <para><xdoc>
        ///   <para>The mosaic dataset on which the stereo model will be built.</para>
        ///   <para>Running Apply Block Adjustment on the input mosaic dataset first will help create a more accurate stereo model.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在其上构建立体模型的镶嵌数据集。</para>
        ///   <para>首先在输入镶嵌数据集上运行应用块平差将有助于创建更精确的立体模型。</para>
        /// </xdoc></para>
        /// </param>
        public BuildStereoModel(object _in_mosaic_dataset)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Build Stereo Model";

        public override string CallName => "management.BuildStereoModel";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _minimum_angle, _maximum_angle, _minimum_overlap, _maximum_diff_OP, _maximum_diff_GSD, _group_by, _out_mosaic_dataset, _same_flight.GetGPValue()];

        /// <summary>
        /// <para>Input Mosaic Dataset</para>
        /// <para><xdoc>
        ///   <para>The mosaic dataset on which the stereo model will be built.</para>
        ///   <para>Running Apply Block Adjustment on the input mosaic dataset first will help create a more accurate stereo model.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在其上构建立体模型的镶嵌数据集。</para>
        ///   <para>首先在输入镶嵌数据集上运行应用块平差将有助于创建更精确的立体模型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Minimum Intersection Angle (in degree)</para>
        /// <para>The value, in degrees, that defines the minimum angle the stereo pair must meet. The default is 10.</para>
        /// <para>定义立体声对必须满足的最小角度的值（以度为单位）。默认值为 10。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Intersection Angle (in degree)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _minimum_angle { get; set; } = 5;


        /// <summary>
        /// <para>Maximum Intersection Angle (in degree)</para>
        /// <para>The value, in degrees, that defines the maximum angle the stereo pair must meet. The default is 70.</para>
        /// <para>定义立体声对必须满足的最大角度的值（以度为单位）。默认值为 70。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Intersection Angle (in degree)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _maximum_angle { get; set; } = 70;


        /// <summary>
        /// <para>Minimum Area Overlap</para>
        /// <para>The percentage of the overlapping area over the whole image. The default is 0.5.</para>
        /// <para>重叠区域在整个图像上的百分比。默认值为 0.5。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Area Overlap")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _minimum_overlap { get; set; } = 0.5;


        /// <summary>
        /// <para>Maximum Omega/Phi Difference (in degree)</para>
        /// <para>The maximum threshold for the Omega and Phi difference between the two image pairs. The Omega values and Phi values for the image pairs are compared. If the difference between either the two Omega or the two Phi values is above the threshold, the pairs will not be formatted as a stereo pair.</para>
        /// <para>两个图像对之间 Omega 和 Phi 差异的最大阈值。比较图像对的 Omega 值和 Phi 值。如果两个 Omega 或两个 Phi 值之间的差值高于阈值，则不会将对格式化为立体声对。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Omega/Phi Difference (in degree)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _maximum_diff_OP { get; set; } = null;


        /// <summary>
        /// <para>Maximum GSD Difference</para>
        /// <para>The threshold for the maximum GSD between two images in a pair. If the resolution ratio between the two images is greater than the threshold value, the pairs will not be built as a stereo pair. The default is 2.</para>
        /// <para>一对中两个图像之间最大 GSD 的阈值。如果两个图像之间的分辨率比大于阈值，则不会将这些对构建为立体对。默认值为 2。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum GSD Difference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _maximum_diff_GSD { get; set; } = 2;


        /// <summary>
        /// <para>Group by</para>
        /// <para>Builds the stereo model from raster items within the same group, defined by a mosaic dataset field such as RGB, Panchromatic, or Infrared.</para>
        /// <para>根据同一组中的栅格项目构建立体模型，这些栅格项目由镶嵌数据集字段（如 RGB、全色或红外）定义。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Group by")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _group_by { get; set; } = null;


        /// <summary>
        /// <para>Updated Mosaic Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Only pick stereo models in the same flight line</para>
        /// <para><xdoc>
        ///   <para>Specifies how the stereo models will be selected.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Stereo pairs will be selected along the same flight line.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Stereo pairs will be selected across flight lines. This is the default.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>This parameter is not applicable to satellite-based sensors.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何选择立体模型。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将沿同一飞行线选择立体声对。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将跨飞行线选择立体声对。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>此参数不适用于基于卫星的传感器。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Only pick stereo models in the same flight line")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _same_flight_value _same_flight { get; set; } = _same_flight_value._false;

        public enum _same_flight_value
        {
            /// <summary>
            /// <para>SAMEFLIGHT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SAMEFLIGHT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_SAMEFLIGHT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SAMEFLIGHT")]
            [GPEnumValue("false")]
            _false,

        }

        public BuildStereoModel SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}